<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>table模块快速使用</title>
  <link rel="stylesheet" href="../layui/css/layui.css" media="all">
</head>
<body>

<table id="demo" lay-filter="test"></table>


<script src="../layui/layui.js"></script>
<script>
  layui.use('table', function(){
    var table = layui.table;

    //第一个实例
    table.render({
      elem: '#demo'
      ,height: 312
      ,url: '/user/ginfo' //数据接口
      ,page: false //开启分页
      ,cols: [[ //表头
        {field: 'classcard', title: '课程号', width:80, fixed: 'left'}
        ,{field: 'kname', title: '课程名', width:200}
        ,{field: 'grade', title: '成绩', width:80, }
     
      ]]
    });

  });
</script>
</body>
</html>